package com.face.facerecognition;

import com.alibaba.fastjson.JSONObject;
import com.face.facerecognition.service.AuthService;
import com.face.facerecognition.service.BaiDuService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.io.IOException;

@SpringBootTest
class FaceRecognitionApplicationTests {

    @Autowired
    private AuthService authService;
    @Autowired
    private BaiDuService baiDuService;
    @Test
    public void baidu1() throws IOException {
        String randomCode = baiDuService.getRandomCode();
        System.out.println(randomCode);
    }


    @Test
    public void baiduVerifyToken() throws IOException {
        JSONObject verifyToken = baiDuService.verifyToken();
        System.out.println(verifyToken);
    }


    @Test
    void contextLoads() {
        String auth = authService.getAccessToken();
        System.out.println(auth);

    }

}
